import axios from 'axios';

export function addRole(param) {
    console.log("param====="+JSON.stringify(param))
    return axios({
        method:"get",
        url:'/organization/addRole',
        params: param,
        headers:{
            'Cache-Control':'no-cache'
        }
    });

}

export function queryAllRole() {
    return axios({
        method:"get",
        url:'/organization/getRoleList',
        headers:{
            'Cache-Control':'no-cache'
        }
    });
}

export function queryOrgListDispatch (param) {
    return axios({
        method : 'get',
        url : ' /organization/getOrgList',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}


export function organizationDistribute (param) {
    console.log("param====distribute==="+JSON.stringify(param))
    return axios({
        method : 'post',
        url : ' /organization/distribute',
        data: param,
        dataType:"json",
        contentType:"application/json",
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function organizationUndistributeAll (param) {
    return axios({
        method : 'get',
        url : ' /organization/cancelDistribute',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}


export function queryAlltDistributeRole() {
    return axios({
        method:"get",
        url:'/organization/getDistributeRoleList',
        headers:{
            'Cache-Control':'no-cache'
        }
    });
}


export function queryAllUndistributeRole() {
    return axios({
        method:"get",
        url:'/organization/getUndistributeRoleList',
        headers:{
            'Cache-Control':'no-cache'
        }
    });
}
